#include "stm32f10x.h"                  // Device header

#define LED_Switch_GPIO GPIOB
#define LED_Switch_Pin GPIO_Pin_0
#define LED_Buzzer_GPIO GPIOB
#define LED_Buzzer_Pin GPIO_Pin_11

void LED_Init(void) {
	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
	
	GPIO_InitTypeDef GPIO_InitStructure;
	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
	GPIO_InitStructure.GPIO_Pin = LED_Switch_Pin;
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
	GPIO_Init(LED_Switch_GPIO, &GPIO_InitStructure);
	
	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
	GPIO_InitStructure.GPIO_Pin = LED_Buzzer_Pin;
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
	GPIO_Init(LED_Switch_GPIO, &GPIO_InitStructure);
}

void LED_switch(uint8_t SWI) {
	GPIO_WriteBit(LED_Switch_GPIO, LED_Switch_Pin, (BitAction)SWI);
}

void LED_buzzer(uint8_t SWI) {
	GPIO_WriteBit(LED_Buzzer_GPIO, LED_Buzzer_Pin, (BitAction)SWI);
}
